//ajax 提交
var xmlhttp;
creatxmlhttprequest();
var xm;
var Return = false;
var posturl = "../../../api/getJs.shtm"; //注意这里以.shtm 作为扩展名 实际对应getJs.jsp 
try {
	xmlhttp.open('POST', posturl, true);
} catch (err) {
	// alert("aaa:"+err.description);
}

xmlhttp.setRequestHeader('Content-Type',
		'application/x-www-form-urlencoded');
xmlhttp.onreadystatechange = statechange;
xmlhttp.send(null);

/***分浏览器 创建对象***/
function creatxmlhttprequest() {
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
	xmlhttp = new XMLHttpRequest();
} else {// code for IE6, IE5
	xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}

function statechange() {
//alert("readyState:"+xmlhttp.readyState);
//alert("status:"+xmlhttp.status);
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
	//document.getElementById("rst").innerHTML = xmlhttp.responseText;
	xm = xmlhttp.responseText;
	xm = trim(xm);			
	//alert("xm:"+xm);
	if (xm == -7) {
		//alert("2");
		Return = true;
		eval(f_offline());
	}
	
}
}
/***删除左右两端的空格***/

function trim(str) { 
return str.replace(/(^\s*)|(\s*$)/g, "");
}